{{--支付模板--}}
    <!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
    <meta charset="utf-8">
    <title>优生活-订单结算页</title>
    <link rel="stylesheet" type="text/css" href="{{asset('org/home/css')}}/index.css">
    <link rel="stylesheet" type="text/css" href="{{asset('org/home/css')}}/ziy.css">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    {{--<script src="{{asset('org/home/js')}}/jquery-1.11.3.min.js" ></script>--}}
{{--<!--  <script src="{{asset('org/home/js')}}/index.js" ></script>  -->--}}
{{--<!-- <script type="text/javascript" src="{{asset('org/home/js')}}/jquery1.42.min.js"></script> -->--}}
    <script type="text/javascript" src="{{asset('org/home/js')}}/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="{{asset('org/home/js')}}/jquery.SuperSlide.2.1.1.source.js"></script>
<!--  <script type="text/javascript" src="{{asset('org/home/js')}}/select.js"></script> -->
    <script>
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
    </script>
</head>
<body>
<!--头部-->

<!--头部-->
<div id="header">
    <div class="header-box">
        <h3 class="huany">优生活购物商城欢迎您的到来！</h3>
        <ul class="header-left">
            <li class="bj">
                <a class="dib" href="#">北京市</a>
                <i class="ci-leftll">
                    <s class="jt">◇</s>
                </i>
                <div class="bj-1">
                    <h3>热门城市：</h3>
                    <a href="">北京</a><a href="">上海</a><a href="">天津</a><a href="">重庆</a><a href="">河北</a><a href="">山西</a><a href="">河南</a><a href="">辽宁</a><a href="">吉林</a><a href="">黑龙江</a><a href="">浙江</a><a href="">江苏</a><a href="">山东</a><a href="">安徽</a><a href="">内蒙古</a><a href="">湖北</a><a href="">湖南</a><a href="">广东</a><a href="">广西</a><a href="">江西</a><a href="">四川</a><a href="">海南</a><a href="">贵州</a><a href="">云南</a><a href="">西藏</a><a href="">陕西</a><a href="">甘肃</a><a href="">青海</a><a href="">宁夏</a><a href="">新疆</a><a href="">台湾</a><a href="">香港</a><a href="">澳门</a><a href="">海外</a><a href="qieh_cs.html">全部+</a>
                </div>
            </li>
        </ul>
        <ul class="header-right">
            <li class="denglu dengl_hou">
                <div>
                    <a class="red" href="">Hi~{{auth()->user()->name}}</a>
                    <i class="ci-leftll">
                        <s class="jt">◇</s>
                    </i>
                </div>
                <div class="dengl_hou_xial_k">
                    <div class="zuid_xiao_toux">
                        <a href="#"><img src="{{auth()->user()->face}}"></a>
                    </div>
                    <div class="huiy_dengj">
                        <a class="tuic_" href="{{route('home.logout')}}">退出</a>
                    </div>
                    <div class="toub_zil_daoh">
                        <a href="{{route('home.center.allOrder')}}">待处理订单</a>
                        <a href="#">我的收藏</a>
                        <a href="{{route('home.center.edit','inform')}}">个人资料</a>
                    </div>
                </div>
            </li>
            <li class="shu"></li>
            <li class="denglu"><a class="ing_ps" href="#">我的收藏</a></li>
            </li>
        </ul>
    </div>
</div>
<!--提交订单——结算页-->
<div class="beij_center">
    <div class="dengl_logo">
        <div>
            <a href="/"><img src="{{asset('org/home/images')}}/logo.jpg" style="width: 250px;margin-top: -35px"></a>
            <h1>订单完成</h1>
        </div>
        <div class="stepflex stepflex_2">
            <dl class="normal done ">
                <dt class="s-num">1</dt>
                <dd class="s-text">1.我的购物车<s></s><b></b></dd>
            </dl>
            <dl class="normal ">
                <dt class="s-num">2</dt>
                <dd class="s-text">2.填写核对订单信息<s></s><b></b></dd>
            </dl>
            <dl class="normal doing">
                <dt class="s-num">3</dt>
                <dd class="s-text">3.成功提交订单<s></s><b></b></dd>
            </dl>
        </div>
    </div>
</div>

<div class="beij_center">
    <div class="jiar_gouw_c_beij">
        <div class="msg"><i class="c_i_img"></i>订单提交成功</div>
        <div class="shangp_jr">
            <div class="jr_zuo">
                <a href="#" class="jr_tu"><img src="{{$orders->orderDetails[0]->good->picture[0]}}"></a>
                <div class="jr_biaot">
                    <p><a href="{{route('home.content',$orders->orderDetails[0]->good)}}">{{$orders->orderDetails[0]->good->title}}</a></p>
                    <p class="spandf"><span></span><span>数量：{{$orders->orderDetails[0]->num}}</span><span>等{{count($orders->orderDetails)}}个商品</span></p>
                </div>
            </div>
            <div class="jr_you">
                <a href="{{route('home.cart.index')}}" class="jr_fanh">返回</a>
                <a href="{{route('home.center.myOrder')}}" class="jr_qv_gouw_che">查看详细订单信息<em class="jr_jiant"></em></a>
            </div>
        </div>
    </div>
    <hr>
    <span>扫码支付：</span>
    @if($orders['status'] == '未付款')
        <hr>
        <img alt="模式二扫码支付" src="/org/wxpay_php_sdk_v3.0.9/example/qrcode.php?data=<?php echo urlencode($url2);?>"
             style="width:150px;height:150px;"/>
    @else
        该订单已支付...
    @endif
</div>
<div class="dib_beij">
    <div class="dib_jvz_beij">
        <div class="shangp_baoz">
            <p>本地购物&nbsp;&nbsp;看得见的商品</p>
            <p class="beng1">正品行货&nbsp;&nbsp;购物无忧</p>
            <p class="beng2">低价实惠&nbsp;&nbsp;帮你省钱</p>
            <p class="beng3">本地直发&nbsp;&nbsp;专业配送</p>
        </div>
        <div class="zhongj_youx">
            <div class="lieb_daoh">
                <h4>物流配送</h4>
                <ul>
                    <li><a href="#">配送查询</a></li>
                    <li><a href="#">配送服务</a></li>
                    <li><a href="#">配送费用</a></li>
                    <li><a href="#">配送时效</a></li>
                    <li><a href="#">签收与验货</a></li>
                </ul>
            </div>
            <div class="lieb_daoh">
                <h4>支付与账户</h4>
                <ul>
                    <li><a href="#">货到付款</a></li>
                    <li><a href="#">在线支付</a></li>
                    <li><a href="#">门店支付</a></li>
                    <li><a href="#">账户安全</a></li>
                </ul>
            </div>
            <div class="lieb_daoh">
                <h4>购物帮助</h4>
                <ul>
                    <li><a href="#">购物保障</a></li>
                    <li><a href="#">购物流程</a></li>
                    <li><a href="#">焦点问题</a></li>
                    <li><a href="#">联系我们</a></li>
                </ul>
            </div>
            <div class="lieb_daoh">
                <h4>售后服务</h4>
                <ul>
                    <li><a href="#">退换货服务</a></li>
                    <li><a href="#">退款说明</a></li>
                    <li><a href="#">专业维修</a></li>
                    <li><a href="#">延保服务</a></li>
                    <li><a href="#">家电回收</a></li>
                </ul>
            </div>
            <div class="lieb_daoh">
                <div class="kef_dianh">
                    <p>客服电话</p><span>18335460350</span>
                </div>
            </div>
            <div class="lieb_daoh">
                <div class="kef_dianh kef_dianh_youx">
                    <p>意见收集邮箱</p><p>1130224187@qq.com</p>
                </div>
            </div>
        </div>
    </div>
</div>
@if($orders['status'] == '未付款')
    <script>
        $(function () {
            var order_num = "{{$orders['order_num']}}";
            //设置定时器.每1s查询当前订单状态
            setInterval(function () {
                //$.post声明以post方式发送异步
                // $.post("请求地址",请求数据,callback,'返回数据类型')
                $.post("{{route('home.checkOrderStatus')}}",{order_num:order_num},function (res) {
                    if(res.code == 1){
                        alert('支付成功');
                        location.href = "{{route('home.center')}}"
                    }
                },'json');
            }, 1000)
        })
    </script>
@endif
</body>
</html>
